#include<stdio.h>
int main()
{
	int arr1[10]={0,1,2,3,4,5,6,7,8,9};
	int arr2[10];
	int n,b,count;
	scanf("%d",&n);
	for(int i=0;i<10;i++)
	{
		if(arr1[i]!=n)
		{
			arr2[b++]=arr1[i];
			count++;
		}
	}
	for(int j=0;j<count-1;j++)
	{
		printf("%d ",arr2[j]);
	}
	return 0;
}
